package com.lemon.smartsafetynew.ui.activity.patrol;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.lemon.smartsafetynew.ui.activity.base.BaseFragmentActivity;
import com.lemon.smartsafetynew.ui.fragment.patrol.SafePatrolHistoryNewFragment;
import com.lemon.smartsafetynew.util.constants.KeyConstants;

/**
 * Created by Andrew on 2017/10/31.
 */

public class SafePatrolHistoryNewActivity extends BaseFragmentActivity {

    private static String item_id;

    @Override
    protected void getBundleArgs() {

        Bundle bundle = getIntent().getExtras();

        if (bundle != null) {
            if(bundle.containsKey(KeyConstants.KEY_SAFE_PATROL_ITEM_ID)) {
                item_id = bundle.getString(KeyConstants.KEY_SAFE_PATROL_ITEM_ID);
            }
        } else {
            callFinish();
        }
    }

    @Override
    public Fragment getFragment() {
        return SafePatrolHistoryNewFragment.newInstance(item_id);
    }

    @Override
    protected void initTitle() {
        this.setBarTitle("巡查历史");
    }
}
